package zuoye04;

public class Rectangle extends Shape {
    private int width, height;

    public Rectangle() {
        this.width = width;
        this.height = height;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        if (width >= 1 & width <= 15) {
            this.width = width;
        } else {
            System.out.println("错误");
        }
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        if (height >= 1 & height <= 15) {
            this.height = height;
        } else {
            System.out.println("错误");
        }
    }

    @Override
    public void draw() {
        for (int i = 0; i < 2; i++) {
            if (i == 1) {
                for (int k = 1; k <= 1; k++) {
                    for (int a = 1; a <= 1; a++) {
                        System.out.print("*");
                    }
                    for (int b = 0;b<6;b++){
                        System.out.print(" ");
                    }
                    System.out.println("*");
                }
            }
            for (int k = 0; k < 7; k++) {
                System.out.print("*");
            }
            System.out.println("*");
        }
    }


    public static void main(String[] args) {
        Rectangle a = new Rectangle();
        a.draw();
    }
}
